import MovieTicketContext from './MovieTicketContext';
import {ChildrenDiscount, VIPDiscount} from './Discount';
import separate from '../patternSeparator';

separate('策略模式');

let ticket = new MovieTicketContext();
let childAlg = new ChildrenDiscount();
let VipAlg = new VIPDiscount();

ticket.setDiscount(childAlg);
ticket.getPrice();

ticket.setDiscount(VipAlg);
ticket.getPrice();